<?php


namespace app\common\validate;


use think\Validate;

class CommentVlidate extends Validate
{
    protected $rule = [
        'article_id' => 'require|number',
        'member_id' => 'require|number',
        'content|评论内容' => 'require|length:1,1024',
    ];

    // 评论提交场景验证
    public function sceneComment()
    {
        return $this->only(['article_id', 'member_id', 'content']);
    }
}